package com.aplink.dellcommercial.webservices;

public class DataResult {
    private Object mData;

    private ErrorCode mErrorCode;
    private MethodParams mMethodParam;

    public static DataResult obtain( Object data, ErrorCode errorCode,
                                     MethodParams methods ) {
        final DataResult dataResult = new DataResult();
        dataResult.mData = data;
        dataResult.mErrorCode = errorCode;
        dataResult.mMethodParam = methods;
        return dataResult;
    }

    public DataResult() {

    }

    public DataResult( Object data ) {
        this.mData = data;
    }

    public Object getData() {
        return this.mData;
    }

    public ErrorCode getErrorCode() {
        return this.mErrorCode;
    }

    public Methods getMethodName() {
        return this.mMethodParam.getName();
    }

    public MethodParams getMethodParam() {
        return this.mMethodParam;
    }

    public void setData( Object data ) {
        this.mData = data;
    }

    public void setErrorCode( ErrorCode errorCode ) {
        this.mErrorCode = errorCode;
    }

    public void setMethodParam( MethodParams method ) {
        this.mMethodParam = method;
    }
}
